<local:DocumentBase x:Class="WPFExcelReport.YCAFS02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    Loaded="Window_Loaded" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    FontSize="12" 
                    Background="White"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:MaskPrice  x:Key="dprice"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:Divideby10000  x:Key="d10000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetQP" />
        <CollectionViewSource   x:Key="vwFS02" Source="{Binding Path=ICC_FS02,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <DockPanel LastChildFill="True" > 
        <StackPanel  DockPanel.Dock="Top"
         >
            <WrapPanel  >
                <Label Content="{Binding Source={Localization:Translate Word=类别编号：}}"    Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTTYPE" Width="39" Margin="10,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="0"  
                         KeyUp="txtART_KeyUp"  CharacterCasing="Upper" Background="Pink" MaxLength="3" FontSize="14" Foreground="#FF141111" Height="26" ></TextBox>
                <Label Content="{Binding Source={Localization:Translate Word=款号：}}"    Width="45" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTICLE" Width="170" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="1"
                         Focusable="True" KeyUp="txtART_KeyUp" Background="YellowGreen" MaxLength="20" FontSize="14" Foreground="#FF141111" Height="26" />
                <Label Content="{Binding Source={Localization:Translate Word=年份：}}"    Width="43" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOLL" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="4" FontSize="14" Foreground="#FF141111" Height="26" />
                <Label Content="{Binding Source={Localization:Translate Word=波段：}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtREASON" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="3"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="14" Foreground="#FF141111" Height="28" />
            </WrapPanel>
            <WrapPanel >
                <Label Content="{Binding Source={Localization:Translate Word=大类：}}"    Width="45" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtPRDGRP" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="4"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="14" Foreground="#FF141111" Height="26" />
                <Label Content="{Binding Source={Localization:Translate Word=小类：}}"    Width="47" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTGRP" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="5"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="4" FontSize="14" Foreground="#FF141111" Height="26" />
                <Label Content="{Binding Source={Localization:Translate Word=材质：}}"    Width="44" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtMATERIAL" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="6"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="14" Foreground="#FF141111" Height="26" />
                <Label Content="{Binding Source={Localization:Translate Word=采购员：}}"    Width="65" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtPURCHASER" Width="148" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="7"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="8" FontSize="14" Foreground="#FF141111" Height="26" />
                <Label Content="{Binding Source={Localization:Translate Word=尺码组：}}"    Width="61" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSIZE" Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="8"
                         KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="14" Foreground="#FF141111" Height="26" />
            </WrapPanel>
            <WrapPanel >
                <Label Content="{Binding Source={Localization:Translate Word=国家标准：}}"    Width="83" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSTANDARD" Width="171" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="9"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="18" FontSize="14" Foreground="#FF141111" Height="26" />
                <Label Content="{Binding Source={Localization:Translate Word=安全类别：}}"    Width="84" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSAFTY" Width="111" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="10"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="9" FontSize="14" Foreground="#FF141111" Height="27" />
                <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnQuery" Click="btnQuery_Click" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                    <Button.Background>
                        <ImageBrush ImageSource="Images/Search.png" />
                    </Button.Background>
                </Button>
                <Button Content="{Binding Source={Localization:Translate Word=EXCEL}}" Margin="20,0,0,0" Name="btnReport" Width="47" Click="btnReport_Click" TabIndex="14" />
                <!--Button   Content="{Binding Source={Localization:Translate Word=预览}}" Margin="20,0,0,0" Name="btnPrintPreview" Width="51" Click="btnPrintPreview_Click" TabIndex="15" /-->
            </WrapPanel>
        </StackPanel> 
     <DataGrid  
               AutoGenerateColumns="False"
               EnableRowVirtualization="True"  
               ItemsSource="{Binding Source={StaticResource ResourceKey=vwFS02}}"  
               HeadersVisibility="Column"
               x:Name="MasterDg"    
               FontSize="12" FontFamily ="Times New Roman" 
               HorizontalScrollBarVisibility="Auto"
               VerticalScrollBarVisibility="Auto"
               >
                <!-- , Converter={StaticResource ResourceKey=gb2312}-->
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=STYLE}" Header="{Binding Source={Localization:Translate Word=款号}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=STYLENAME}" Header="{Binding Source={Localization:Translate Word=款号描述}}" Width="SizeToCells" MinWidth="70" />
                    <DataGridTextColumn Binding="{Binding Path=COLORNAME}" Header="{Binding Source={Localization:Translate Word=颜色}}" Width="SizeToCells" MinWidth="60" />
                    <DataGridTextColumn Binding="{Binding Path=SIZENAME}" Header="{Binding Source={Localization:Translate Word=尺码}}" Width="SizeToCells" MinWidth="60" />
                    <DataGridTextColumn Binding="{Binding Path=SALESPRICE}" Header="{Binding Source={Localization:Translate Word=销售价}}" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=COSTPRICE}" Header="{Binding Source={Localization:Translate Word=成本价}}" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=TYPE}" Header="{Binding Source={Localization:Translate Word=类型}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=TYPENAME}" Header="{Binding Source={Localization:Translate Word=类型名称}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=COLL}" Header="{Binding Source={Localization:Translate Word=年份}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=REASON}" Header="{Binding Source={Localization:Translate Word=季节}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=REASONNAME}" Header="{Binding Source={Localization:Translate Word=季节名称}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=PRDGROUP}" Header="{Binding Source={Localization:Translate Word=大类}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=PRDGRPNAME}" Header="{Binding Source={Localization:Translate Word=大类名称}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ARTGROUP}" Header="{Binding Source={Localization:Translate Word=小类}}" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ARTGRPNAME}" Header="{Binding Source={Localization:Translate Word=小类名称}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=MATERIAL}" Header="{Binding Source={Localization:Translate Word=材质}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=MATERIALNAME}" Header="{Binding Source={Localization:Translate Word=材质名称}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=COUNTRYSTANDARD}" Header="{Binding Source={Localization:Translate Word=国家标准}}" Width="SizeToCells" MinWidth="80" />
                    <DataGridTextColumn Binding="{Binding Path=SAFTYNAME}" Header="{Binding Source={Localization:Translate Word=安全类型}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=CONTDATE}" Header="{Binding Source={Localization:Translate Word=合同日期}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=MARKDATE}" Header="{Binding Source={Localization:Translate Word=上市日期}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=PURCHASER}" Header="{Binding Source={Localization:Translate Word=采购员}}" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=FSGRRAS}" Header="{Binding Source={Localization:Translate Word=尺码组}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=TKZ}" Header="{Binding Source={Localization:Translate Word=供应类型}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=SUPPNAME}" Header="{Binding Source={Localization:Translate Word=供应商}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=SUPPART}" Header="{Binding Source={Localization:Translate Word=供应商品种名}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=SUPPCOLOR}" Header="{Binding Source={Localization:Translate Word=供应商颜色}}" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=SUPPPRICE}" Header="{Binding Source={Localization:Translate Word=供应商单价}}" Width="SizeToCells" MinWidth="30" />
                </DataGrid.Columns>
            </DataGrid > 
    </DockPanel>
</local:DocumentBase>
